/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ineatconseil.yougo.wicket.dao;

import com.ineatconseil.yougo.dto.UserDto;
import com.sun.jersey.api.client.GenericType;

/**
 *
 * @author nicolasger
 */
public class UsersDao extends GenericDao {

	private UsersDao() {
	}
	private static UsersDao instance;

	public static UsersDao getInstance() {
		if (instance == null) {
			instance = new UsersDao();
		}
		return instance;
	}

	public UserDto signin(String login, String password) {
		initClient(login, password);
		return call(login, new GenericType<UserDto>(){});
	}

	@Override
	protected String getRelativeUrl() {
		return "users";
	}
}
